#ifndef POINT_3D
#define POINT_3D
#include <Define.h>
#include <osg/MatrixTransform>
#include <osg/ShapeDrawable>
#include <osg/LineWidth>
class OSG_EDITOR_DLL Point3D : public osg::MatrixTransform
{
public:
    Point3D();
    Point3D(const Point3D &point3D, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY);
    virtual ~Point3D();

    //virtual osg::Object * cloneType () const;
    //virtual osg::Object * clone (const osg::CopyOp &copyop) const;

    double getRadius();
    double getFineness();
    double getCoordinateSize();
    bool getShowShpere();
    bool getShowCoordinate();
    double getCoordinateLineSize();

    void setRadius(double radius);
    void setFineness(double fineness);
    void setCoordinateSize(double coorSize);
    void setShowShpere(bool boolValue);
    void setShowCoordinate(bool boolValue);
    void setCoordinateLineSize(double doubleValue);

    void setIndexInTrajectory3D(int index);
    int getIndexInTrajectory3D();
    osg::Vec3 getPosition();
protected:
    void buildChildNode();
private:
    double m_radius;
    double m_fineness;
    double m_coordinateSize;
    double m_coordinateLineSize;

    //
    osg::ref_ptr<osg::Sphere> m_sphere;
    osg::ref_ptr<osg::ShapeDrawable> m_shpereShapeDrawable;
    osg::ref_ptr<osg::Vec3Array> m_coordinatePointVector;
    osg::ref_ptr<osg::Geometry> m_coordinateGeom;
    osg::ref_ptr<osg::Switch> m_switch;
    osg::ref_ptr<osg::LineWidth> m_lineWidth;
    int m_indexInTrajectory3D;
};



#endif //POINT_3D
